/* function xq(){
    return new Promise((resolve,reject)=>{
        setTimeout(()=>{
            console.log('章总相亲了');
            resolve('相亲顺利')
        },2000)
    })
}
function marry(){
    return new Promise((resolve,reject)=>{
        setTimeout(()=>{
            console.log('章总结婚了');
            resolve()
        },1000)
    })

}
function bady(){
    console.log('小章出生了');
    
}
xq().then((res)=>{
return marry
})
.then(()=>{
    bady()
}) */

function xq() {
    return new Promise((resolve, reject) => {
        setTimeout(() => {
            console.log('彭于晏相亲了');
            resolve()
        }, 2000)
    })
}
function marry() {
    return new Promise((resolve, reject) => {
        setTimeout(() => {
            console.log('彭于晏结婚了');
            resolve()
        }, 1000)
    })
}

function bady() {
    console.log('小彭出生了');
}
xq().
then(() => {
    marry().then(() => {
    bady()
})
})
